package fr.soat.agileconference2010.constructeurcher;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

public class Dictionnaire {
  private Map<String, String> definitions = new HashMap<String, String>();

  public Dictionnaire() throws IOException {
    File file = new File("francais.txt");
    BufferedReader reader = new BufferedReader(new FileReader(file));
    String ligne;
    while ((ligne = reader.readLine()) != null) {
      String[] tableauLigne = ligne.split(":");
      definitions.put(tableauLigne[0], tableauLigne[1]);
    }
  }

  public String getDefinition(String mot) {
    return definitions.get(mot);
  }
  

}
